//
//  StaticValible.c
//  CProject
//
//  Created by XMYY-19 on 2018/8/29.
//  Copyright © 2018年 黄小刚. All rights reserved.
//

#include "StaticValible.h"


int f(int a ) {
    
    /// dev dev
    
    
    //asdadasd  asdadasd
    
    // adsadb 0814
    
    
    
    
    auto int b = 0;
    static int c = 3;
    b = b + 1;
    c = c + 1;
    return (a + b + c);
}

void testT(void) {
    
    
    int a = 2,i;
    for (i = 0; i < 3; i ++) {
        printf("%d\n",f(a));
    }
}

//--------816-------
int fac (int n ) {
    static int f = 1;
    f = f * n;
    
    return f;
}


void test816(void) {
    
    for (int i = 1; i < 6; i ++) {
        printf("res:%d\n",fac(i));
    }
}

// --------------817--------
int fac817(int n) {
    register int i, f = 1;
    for (i = 1; i < n ; i ++) {
        f = f * n;
    }
    return (f);
}


void test817(void) {
    for (int i = 0; i <= 5; i ++) {
        printf("%d!=%d\n",i,fac817(i));
    }
}

// ---------------818-------
int max (int x, int y) {
    int z;
    z = x > y ? x : y;
    return z;
}

void test818(void) {
    
    extern int A;
    extern int B;
    
    printf("%d \n",max(A, B));
}

int A = 12,B = 89;








